<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_jpeg.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">dev_jpeg.c</div></div>
</div><!--header-->
<div class="contents">
<a href="dev__jpeg_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="dev__jpeg_8h.html">dev_jpeg.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a134ecf44573e0f7204be01b09c1e48bb">   34</a></span>uint8_t <a class="code hl_variable" href="dev__jpeg_8c.html#a134ecf44573e0f7204be01b09c1e48bb">JPEG_Decoder_Buff</a>[512 * 1024<span class="comment">/*LCD_HDOT * LCD_VDOT * LCD_FMT*/</span>]</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>__attribute__(( section(<span class="stringliteral">&quot;.SDRAM1&quot;</span>), aligned(4) ));</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">   38</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>{</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">   40</a></span>    <a class="code hl_enumvalue" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a> = 0, </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>    <a class="code hl_enumvalue" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a>      </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <span class="comment">/* 可以枚举拓展 ++ 累计触发次数 */</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">   43</a></span>} <a class="code hl_enumeration" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">irq_flag_t</a>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#ac226d28552b805cfde07209d751e923e">   45</a></span><span class="keyword">static</span> <span class="keyword">volatile</span> <a class="code hl_enumeration" href="dev__dac_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">irq_flag_t</a> <a class="code hl_variable" href="dev__jpeg_8c.html#ac226d28552b805cfde07209d751e923e">IRQ_JPEG_Flag</a> = <a class="code hl_enumvalue" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a>; </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a1cbc17a98f22c1c19a7d33c85a14fccd">   57</a></span>uint8_t <a class="code hl_function" href="dev__jpeg_8c.html#a1cbc17a98f22c1c19a7d33c85a14fccd">jpeg_decode_isbusy</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>{</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#if 1 </span><span class="comment">/* 1-寄存器查询 / 0-解码完成中断 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    <span class="keywordflow">return</span> (JPEG-&gt;SR &amp; JPEG_SR_BUSY_Msk) ? 1 : 0; <span class="comment">/* JPEG_DecodeBusy(JPEG); */</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <span class="keywordflow">return</span> (<a class="code hl_variable" href="dev__jpeg_8c.html#ac226d28552b805cfde07209d751e923e">IRQ_JPEG_Flag</a> == <a class="code hl_enumvalue" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a>) ? 1 : 0; <span class="comment">/* JPEG_initStruct.DoneIEn == 1 时可用, 其 IRQ_JPEG_Flag 为 JPEG_Handler 内的标志变量 */</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>}</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#ac0e9fc8534c961b9dbba6ad4b8e8b61e">   85</a></span><span class="keywordtype">void</span> *<a class="code hl_function" href="dev__jpeg_8c.html#ac0e9fc8534c961b9dbba6ad4b8e8b61e">jpeg_decode</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *buff, <span class="keyword">const</span> uint32_t size, </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>                  <span class="keyword">const</span> jpeg_outset_t *jpeg_outset, <span class="keywordtype">void</span> *(*ram_malloc)(<span class="keywordtype">size_t</span> size), </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>                  <span class="keyword">const</span> uint8_t wait)</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>{</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>    <span class="keywordflow">if</span> (NULL == buff || 0 == size)</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>        <span class="keywordflow">return</span> NULL; <span class="comment">// assert</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    <span class="comment">/* jpeg_outset 与 ram_malloc 同时无效, 表明调用者传入了错误参数, 应抛出. */</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>    <span class="keywordflow">if</span> (NULL == jpeg_outset &amp;&amp; NULL == ram_malloc)</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>    {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>        printf(<span class="stringliteral">&quot;[jpeg_outset] and [ram_malloc] is invalid!\r\n&quot;</span>);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>        <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>    }</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>    uint8_t res = <a class="code hl_function" href="jfif__parser_8c.html#abf9f65ef7651d67c735920acc808427a">jfif_parse</a>((<span class="keyword">const</span> uint8_t *)buff, size, &amp;<a class="code hl_variable" href="jfif__parser_8c.html#ad5869f8e3b141200c34cb4541329a8b2">JFIF_Info</a>);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    <span class="keywordflow">if</span> (<a class="code hl_define" href="jfif__parser_8h.html#a23863c3287532ed3417695b1568ccb64">JFIF_RES_OK</a> != res)</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>        printf(<span class="stringliteral">&quot;jfif_parse result = [%d]\r\n&quot;</span>, res);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>        <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    }</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    uint32_t img_size = (<a class="code hl_variable" href="jfif__parser_8c.html#ad5869f8e3b141200c34cb4541329a8b2">JFIF_Info</a>.Width) * (<a class="code hl_variable" href="jfif__parser_8c.html#ad5869f8e3b141200c34cb4541329a8b2">JFIF_Info</a>.Height) * <a class="code hl_define" href="version_8h.html#ae3f7a8bd03ba0b575f7ece837aab91aa">LCD_FMT</a>;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>    <span class="comment">/* JPEG 解码输出设定 */</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    jpeg_outset_t jpeg_outset_register;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>    jpeg_outset_t *jpeg_ptr;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    <span class="keywordflow">if</span> (NULL != jpeg_outset) <span class="comment">/* jpeg_outset 有效则优先使用传参设定 */</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    {</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>        jpeg_ptr = (jpeg_outset_t *)jpeg_outset;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>        </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>        <span class="keywordflow">if</span> (NULL != ram_malloc) <span class="comment">/* ram_malloc 有效, 内存分配策略由调用者实现 */</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>        {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>            <span class="keywordtype">void</span> *mem_ptr = ram_malloc(img_size);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>            <span class="keywordflow">if</span> (NULL == mem_ptr)</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>            {</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>                printf(<span class="stringliteral">&quot;[ram_malloc] size = [%d], result is error!\r\n&quot;</span>, img_size);</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>                <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>            }</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>            jpeg_outset_register.format = jpeg_ptr-&gt;format;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>            jpeg_outset_register.dither = jpeg_ptr-&gt;dither;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>            jpeg_outset_register.RGBAddr = (uint32_t)mem_ptr; <span class="comment">/* 忽视 jpeg_outset-&gt;RGBAddr */</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>            jpeg_ptr = &amp;jpeg_outset_register;</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>        }</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SDRAMM_BASE &gt; jpeg_ptr-&gt;RGBAddr || jpeg_ptr-&gt;RGBAddr &gt; SDRAMM_BASE + <a class="code hl_define" href="version_8h.html#a52545d915cb8a3be458871130e58997a">SDRAMM_SIZE</a> - img_size)</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>        {</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>            <span class="comment">/* ram_malloc 无效 &amp;&amp; jpeg_outset-&gt;RGBAddr 预期设定地址越界, 不能解码. 抛出. */</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>            printf(<span class="stringliteral">&quot;[jpeg_outset-&gt;RGBAddr] = 0x[%x], result is error!\r\n&quot;</span>, jpeg_ptr-&gt;RGBAddr);</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>            <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>        }</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    }</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (NULL != ram_malloc) <span class="comment">/* jpeg_outset 无效, 则 ram_malloc 必须有效, 否则无法解码 */</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    {</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>        <span class="keywordtype">void</span> *mem_ptr = ram_malloc(img_size); <span class="comment">/* 内存分配策略由调用者实现 */</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>        <span class="keywordflow">if</span> (NULL == mem_ptr)</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>        {</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>            printf(<span class="stringliteral">&quot;[ram_malloc] size = [%d], result is error!\r\n&quot;</span>, img_size);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>            <span class="keywordflow">return</span> NULL;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>        }</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>        <span class="comment">/* jpeg_outset 无效则使用 version.h 宏配置默认设定 */</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span><span class="preprocessor">#if (LCD_FMT == LCD_RGB565)</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>        jpeg_outset_register.format = JPEG_OUT_RGB565; <span class="comment">/* JPEG_OUT_BGR565 */</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="preprocessor">#elif (LCD_FMT == LCD_ARGB888)</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>        jpeg_outset_register.format = JPEG_OUT_XRGB888;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>        jpeg_outset_register.dither = 0; <span class="comment">/* RGB565 dithering enable, 默认关 */</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>        jpeg_outset_register.RGBAddr = (uint32_t)mem_ptr;</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>        jpeg_ptr = &amp;jpeg_outset_register;</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>    }</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>    <a class="code hl_variable" href="dev__jpeg_8c.html#ac226d28552b805cfde07209d751e923e">IRQ_JPEG_Flag</a> = <a class="code hl_enumvalue" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a>; <span class="comment">/* 忙碌 */</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>    </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>    JPEG_Decode(JPEG, &amp;<a class="code hl_variable" href="jfif__parser_8c.html#ad5869f8e3b141200c34cb4541329a8b2">JFIF_Info</a>, jpeg_ptr);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>    <span class="keywordflow">while</span> (wait != 0 &amp;&amp; <a class="code hl_function" href="dev__jpeg_8c.html#a1cbc17a98f22c1c19a7d33c85a14fccd">jpeg_decode_isbusy</a>() != 0)</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>        ;</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span> </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>    <span class="keywordflow">return</span> (<span class="keywordtype">void</span> *)(jpeg_ptr-&gt;RGBAddr);</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>}</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span> </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a036588013ef5d04b04f06e8ecd22262e">  168</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__jpeg_8c.html#a036588013ef5d04b04f06e8ecd22262e">jpeg_init</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno">  169</span>{</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>    JPEG_InitStructure JPEG_initStruct;</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>    JPEG_initStruct.DoneIEn = 0;  <span class="comment">/* 解码完成中断 */</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>    JPEG_initStruct.ErrorIEn = 1; <span class="comment">/* 解码错误中断 */</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>    JPEG_Init(JPEG, &amp;JPEG_initStruct);</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span>}</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="dev__jpeg_8c.html#a72dac42e70bc8ad56832a3a3045476e7">  179</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__jpeg_8c.html#a72dac42e70bc8ad56832a3a3045476e7">isr_jpeg</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>{</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>    <span class="keywordflow">if</span> (JPEG-&gt;IR &amp; JPEG_IR_IFERROR_Msk)</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>    {</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>        JPEG-&gt;IR |= JPEG_IR_ICERROR_Msk;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>        <span class="comment">/*</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="comment">        if (JPEG-&gt;SR &amp; JPEG_SR_CUOVR_Msk)</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="comment">        {</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span><span class="comment">            ;// JPEG CU run length overflow error</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span><span class="comment">        }</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span><span class="comment">        else if (JPEG-&gt;SR &amp; JPEG_SR_REIMERR_Msk)</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span><span class="comment">        {</span></div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span><span class="comment">            ;// JPEG Restart interval marker error</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span><span class="comment">        }</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span><span class="comment">        */</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span>        <span class="comment">/* while ( (JPEG-&gt;SR &amp; JPEG_SR_DMARDBUSY_Msk) || (JPEG-&gt;SR &amp; JPEG_SR_DMAWRBUSY_Msk) ) ; */</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>        JPEG-&gt;CR |= (1 &lt;&lt; JPEG_CR_RESET_Pos); <span class="comment">/* Reset JPEG Core */</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>    }</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (JPEG-&gt;IR &amp; JPEG_IR_IFDONE_Msk)</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span>    {</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>        JPEG-&gt;IR |= JPEG_IR_ICDONE_Msk;</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>        </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>        <a class="code hl_variable" href="dev__jpeg_8c.html#ac226d28552b805cfde07209d751e923e">IRQ_JPEG_Flag</a> = <a class="code hl_enumvalue" href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a>;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>    }</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>}</div>
<div class="ttc" id="adev__dac_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31a"><div class="ttname"><a href="dev__dac_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">irq_flag_t</a></div><div class="ttdeci">irq_flag_t</div><div class="ttdoc">中断标志</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00076">dev_dac.c:77</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a036588013ef5d04b04f06e8ecd22262e"><div class="ttname"><a href="dev__jpeg_8c.html#a036588013ef5d04b04f06e8ecd22262e">jpeg_init</a></div><div class="ttdeci">void jpeg_init(void)</div><div class="ttdoc">初始化 JPEG 硬件解码器模块</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00168">dev_jpeg.c:168</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a134ecf44573e0f7204be01b09c1e48bb"><div class="ttname"><a href="dev__jpeg_8c.html#a134ecf44573e0f7204be01b09c1e48bb">JPEG_Decoder_Buff</a></div><div class="ttdeci">uint8_t JPEG_Decoder_Buff[512 *1024]</div><div class="ttdoc">使用 JPEG 解码需要一块缓冲区, 大小视图片文件大小决定, 不能小于最大的那张 JPEG 图的大小, 只有在理论极坏情况下会接近原图大小, 因为 JPEG 编码利用人类视觉系统对色彩/高频的不敏感特...</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00034">dev_jpeg.c:35</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a1cbc17a98f22c1c19a7d33c85a14fccd"><div class="ttname"><a href="dev__jpeg_8c.html#a1cbc17a98f22c1c19a7d33c85a14fccd">jpeg_decode_isbusy</a></div><div class="ttdeci">uint8_t jpeg_decode_isbusy(void)</div><div class="ttdoc">JPEG 硬件解码忙查询</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00057">dev_jpeg.c:57</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31a"><div class="ttname"><a href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">irq_flag_t</a></div><div class="ttdeci">irq_flag_t</div><div class="ttdoc">中断标志</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00038">dev_jpeg.c:39</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31"><div class="ttname"><a href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a></div><div class="ttdeci">@ NO</div><div class="ttdoc">未触发中断</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00040">dev_jpeg.c:40</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59"><div class="ttname"><a href="dev__jpeg_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a></div><div class="ttdeci">@ OK</div><div class="ttdoc">已触发中断</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00043">dev_jpeg.c:41</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_a72dac42e70bc8ad56832a3a3045476e7"><div class="ttname"><a href="dev__jpeg_8c.html#a72dac42e70bc8ad56832a3a3045476e7">isr_jpeg</a></div><div class="ttdeci">void isr_jpeg(void)</div><div class="ttdoc">JPEG ISR Callback</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00179">dev_jpeg.c:179</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_ac0e9fc8534c961b9dbba6ad4b8e8b61e"><div class="ttname"><a href="dev__jpeg_8c.html#ac0e9fc8534c961b9dbba6ad4b8e8b61e">jpeg_decode</a></div><div class="ttdeci">void * jpeg_decode(const void *buff, const uint32_t size, const jpeg_outset_t *jpeg_outset, void *(*ram_malloc)(size_t size), const uint8_t wait)</div><div class="ttdoc">JPEG 硬件解码</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00085">dev_jpeg.c:85</a></div></div>
<div class="ttc" id="adev__jpeg_8c_html_ac226d28552b805cfde07209d751e923e"><div class="ttname"><a href="dev__jpeg_8c.html#ac226d28552b805cfde07209d751e923e">IRQ_JPEG_Flag</a></div><div class="ttdeci">static volatile irq_flag_t IRQ_JPEG_Flag</div><div class="ttdoc">JPEG 解码完成标志</div><div class="ttdef"><b>Definition:</b> <a href="dev__jpeg_8c_source.html#l00045">dev_jpeg.c:45</a></div></div>
<div class="ttc" id="adev__jpeg_8h_html"><div class="ttname"><a href="dev__jpeg_8h.html">dev_jpeg.h</a></div><div class="ttdoc">JPEG 硬件解码</div></div>
<div class="ttc" id="ajfif__parser_8c_html_abf9f65ef7651d67c735920acc808427a"><div class="ttname"><a href="jfif__parser_8c.html#abf9f65ef7651d67c735920acc808427a">jfif_parse</a></div><div class="ttdeci">int jfif_parse(const uint8_t buf[], uint32_t len, jfif_info_t *jfif_info)</div><div class="ttdoc">JPEG 图片解析 JFIF 格式</div><div class="ttdef"><b>Definition:</b> <a href="jfif__parser_8c_source.html#l00037">jfif_parser.c:37</a></div></div>
<div class="ttc" id="ajfif__parser_8c_html_ad5869f8e3b141200c34cb4541329a8b2"><div class="ttname"><a href="jfif__parser_8c.html#ad5869f8e3b141200c34cb4541329a8b2">JFIF_Info</a></div><div class="ttdeci">jfif_info_t JFIF_Info</div><div class="ttdoc">JFIF 格式解析信息</div><div class="ttdef"><b>Definition:</b> <a href="jfif__parser_8c_source.html#l00025">jfif_parser.c:25</a></div></div>
<div class="ttc" id="ajfif__parser_8h_html_a23863c3287532ed3417695b1568ccb64"><div class="ttname"><a href="jfif__parser_8h.html#a23863c3287532ed3417695b1568ccb64">JFIF_RES_OK</a></div><div class="ttdeci">#define JFIF_RES_OK</div><div class="ttdef"><b>Definition:</b> <a href="jfif__parser_8h_source.html#l00026">jfif_parser.h:26</a></div></div>
<div class="ttc" id="aversion_8h_html_a52545d915cb8a3be458871130e58997a"><div class="ttname"><a href="version_8h.html#a52545d915cb8a3be458871130e58997a">SDRAMM_SIZE</a></div><div class="ttdeci">#define SDRAMM_SIZE</div><div class="ttdoc">SDRAMM_SIZE : 内置的 SDRAM 大小,提供客制化选项</div><div class="ttdef"><b>Definition:</b> <a href="version_8h_source.html#l00267">version.h:267</a></div></div>
<div class="ttc" id="aversion_8h_html_ae3f7a8bd03ba0b575f7ece837aab91aa"><div class="ttname"><a href="version_8h.html#ae3f7a8bd03ba0b575f7ece837aab91aa">LCD_FMT</a></div><div class="ttdeci">#define LCD_FMT</div><div class="ttdoc">enum : LCD 显示格式(LCD_FORMAT) 其值为一个像素点所占用的字节数, 可使用该值结合分辨率计算一帧显示缓存的大小</div><div class="ttdef"><b>Definition:</b> <a href="version_8h_source.html#l00246">version.h:246</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
